<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Title</title>
</head>
<body>
<script>
  let name="zhangsan";
  let age = 20;

  let user={
    name: name,
    age: age
  }

  //可以简写为
  let user2={name,age}

  console.log(user)
  console.log(user2)
</script>
</body>
</html>
